#ifndef HMS_CACHE_INFO
#define HMS_CACHE_INFO

#include <string>

#if defined (__unix__) || (defined (__APPLE__) && defined (__MACH__))
#define HMS_IS_POSIX
#endif

namespace hms
{

/**
 * @brief Print the cache info. Executes "lscpu | grep 'cache'" and returns
 * its output.
 * 
 * @return std::string 
 */
std::string cacheInfo();

/**
 * @brief Retrieves cache sizes and returns the highest one, in Bytes.
 * 
 * @return long 
 */
long lastLevelCacheSize();

/**
 * @brief Returns the cache size per max number of OpenMP threads, in Bytes.
 * Performs integer division.
 * Therefore, the fractional part of the result is lost.
 * 
 * @return long
 */
long cachePerThread();

} // namespace hms

#endif